unsigned int Fact(unsigned int n)
{
    unsigned int i;
    unsigned int result=1;
    for(i=2;i<=n;i++)
    {
        result*=i;
    }
    return result;
}
